import request from '@/utils/request'

// 查询比价信息列表
export function listPurchaseParity(query) {
  return request({
    url: '/oa/purchaseParity/list',
    method: 'get',
    params: query
  })
}

// 查询比价信息详细
export function getPurchaseParity(id) {
  return request({
    url: '/oa/purchaseParity/' + id,
    method: 'get'
  })
}

// 新增比价信息
export function addPurchaseParity(data) {
  return request({
    url: '/oa/purchaseParity',
    method: 'post',
    data: data
  })
}

// 修改比价信息
export function updatePurchaseParity(data) {
  return request({
    url: '/oa/purchaseParity',
    method: 'put',
    data: data
  })
}

// 删除比价信息
export function delPurchaseParity(id) {
  return request({
    url: '/oa/purchaseParity/' + id,
    method: 'delete'
  })
}

// 获取没有比价信息的项目信息
export function getProjectList() {
  return request({
    url: '/oa/purchaseParity/getProjectList',
    method: 'get'
  })
}
// 通过项目名称查询比价信息
export function queryPurchaseParityByProjectName(data) {
  return request({
    url: '/oa/purchaseParity/queryByProjectName',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data: data,
  })
}
